home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / jam / jamdisk7 / inc9110b.lzh / include / stdarg.h < prev    next >
C/C++ Source or Header  |  1991-04-15  |  1KB  |  46 lines

  1. /*
  2.  * Libraries and headers for PDC release 3.3 (C) 1989 Lionel Hummel.
  3.  * PDC Software Distribution (C) 1989 Lionel Hummel and Paul Petersen.
  4.  * PDC I/O Library (C) 1987 by J.A. Lydiatt.
  5.  *
  6.  * This code is freely redistributable upon the conditions that this 
  7.  * notice remains intact and that modified versions of this file not
  8.  * be included as part of the PDC Software Distribution without the
  9.  * express consent of the copyright holders.  No warrantee of any
  10.  * kind is provided with this code.  For further information, contact:
  11.  *
  12.  *  PDC Software Distribution    Internet:                     BIX:
  13.  *  P.O. Box 4006             or hummel@cs.uiuc.edu            lhummel
  14.  *  Urbana, IL  61801-8801       petersen@uicsrd.csrd.uiuc.edu
  15.  */
  16.  
  17. /* Macros enabling functions to portably handle variable numbers of
  18.  * arguments.
  19.  */
  20.  
  21. /*
  22.  * 10 Feb 91 Simon Wright; fix va_start(), remove va_decl
  23.  *  3 Mar 91 sjw; ensure only effective once
  24.  * 15 Apr 91 sjw; allow use with varargs.h, sort va_arg
  25.  */
  26.  
  27. #ifndef __STDARG_H__
  28. #define __STDARG_H__
  29.  
  30. #ifdef __VARARGS_H__
  31. #undef __VARARGS_H__
  32. #undef va_dcl
  33. #undef va_start
  34. #undef va_end
  35. #else
  36. typedef char            *va_list;
  37. #endif
  38.  
  39. #define va_start(X, L)    (X = (va_list)((int)&L + ((sizeof(L) + 3) & ~3)))
  40. #define va_arg(X, T)    ((T *)(X += ((sizeof(T) + 3) & ~3)))[-1]
  41. #define va_end(X)
  42.  
  43. #endif /* __STDARG_H__ */
  44.  
  45.  
  46.